feat(status_events): update values on startup#49
Conversation
|
Hey, your PR is titled |
|
Hey, your PR is titled |
| def update_values | ||
| PlaceOS::Model::Module.all.in_groups_of(64, reuse: true) do |modules| | ||
| modules.each do |mod| | ||
| store = PlaceOS::Driver::RedisStorage.new(mod.try(&.id) || raise Exception.new("Nil assertion failed since the module is Nil")) |
There was a problem hiding this comment.
We should probably just skip over anything where mod.try(&.id) == nil
something like:
mod_id = mod.try(&.id)
next unless mod_id
store = PlaceOS::Driver::RedisStorage.new(mod_id)There was a problem hiding this comment.
Agreed, instead of raising that would be a much better outcome
|
Hey, your PR is titled |
|
Hey, your PR is titled |
|
Hey, your PR is titled |
|
Hey, your PR is titled |
good enough
|
Hey, your PR is titled |
|
Hey, your PR is titled |
|
Hey, your PR is titled |
|
Hey, your PR is titled |
Updated shard versions and hook update_values function into the start and stop functions